package org.example.advice;

import org.example.web.domain.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class UnitExceptionHandler{
    @ExceptionHandler
    public Result ex(NotNull e){
        return Result.error(e.getMessage());
    }
}
